/*
* @Author: Adolphus.Yao
* @Date:   2019-08-29 21:29:29
* @Last Modified by:   Adolphus.Yao
* @Last Modified time: 2019-08-29 21:35:42
*/
package repositories

import (
    "fulnero.com/iris/mvc/datamodels"
)

type Query func(datamodels.Dao) bool

type MovieRepository interface {
    Exec(query Query, action Query, limit int, mode int) (ok bool)
    Select(query Query) (dao datamodels.Dao, found bool)
    SelectMany(query Query, limit int) (results []datamodels.Dao)
    InsertOrUpdate(dao datamodels.Dao) (updateMovie datamodels.Dao, err error)
    Delete(query Query, limit int) (deleted bool)
}
